package com.github.bridge.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
public class BuildTemplateDocDTO {

    @NotEmpty(message = "模板表单值不能为空")
    @Schema(description = "模板表单值", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<BuildTemplateDocDTO.TemplateFormValue> templateFormValues;

    @NotBlank(message = "模板id不能为空")
    @Schema(description = "模板id", requiredMode = Schema.RequiredMode.REQUIRED)
    private String templateId;

    @Data
    public static class TemplateFormValue {

        @Schema(description = "表单id")
        private Integer formId;

        @Schema(description = "表单值")
        private String formValue;

    }
}
